<template>
  <div>
    <router-view/>
    <Player v-if="currentList.length" />
  </div>
</template>

<script>
import Player from '@/views/Music/Player';
import { mapState } from 'vuex';

export default {
  components: {
    Player,
  },
  computed: {
    ...mapState('player', ['currentList', 'playerType']),
    ...mapState('user', ['token']),
  },
  mounted() {
    
  },
  watch: {
    token: {
      immediate: true,
      handler(val) {
        if (!val) {
          this.$router.replace('/home');
        }
      }
    }
  }
};
</script>

<style lang="scss" scoped>

</style>
